//
//  ViewController.m
//  LiuXSegment
//
//  Created by 刘鑫 on 16/3/18.
//  Copyright © 2016年 liuxin. All rights reserved.
//

#import "ViewController.h"
#import "LiuXSegmentView.h"
#import "OneViewController.h"
#import "TowViewController.h"
#import "ThreeViewController.h"
@interface ViewController (){
    
    NSInteger selectNum;
}

@property (nonatomic,strong)UIScrollView *scroll;
@property (nonatomic,strong)UIPageControl *page;

@end

@implementation ViewController
-(UIScrollView *)scroll{
    if (!_scroll) {
        _scroll = [[UIScrollView alloc]initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height)];
    }
    return _scroll;
    
}
- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view, typically from a nib.

    self.automaticallyAdjustsScrollViewInsets = NO;
    
    LiuXSegmentView *view=[[LiuXSegmentView alloc] initWithFrame:CGRectMake(0, 64, self.view.frame.size.width, 60) titles:@[@"头条",@"社会",@"热点",@"体育",@"搞笑",@"科技",@"手机",@"娱乐"] clickBlick:^void(NSInteger index) {
        
        NSLog(@"-----%ld",index);

       
        
    }];
    
    
    //以下属性可以根据需求修改
//    view.titleFont=[UIFont systemFontOfSize:30];
//    view.defaultIndex=2;
//    view.titleNomalColor=[UIColor blueColor];
//    view.titleSelectColor=[UIColor orangeColor];
    [self.view addSubview:view];
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end
// 版权属于原作者
// http://code4app.com (cn) http://code4app.net (en)
// 发布代码于最专业的源码分享网站: Code4App.com
